package com.ftg.learn.chapter09.listtest;

import lombok.ToString;

import java.util.List;

/**
 * @author lijiaxin
 * @version 1.0
 * @date 2023/8/18 10:10
 */
@ToString
public class Worker {
    private int age;

    private String name;

    private double salary;

    public Worker (){}

    public Worker (String name, int age, double salary){
        this.name = name;

        this.age = age;

        this.salary = salary;

    }

    public int getAge() {

        return age;

    }

    public void setAge(int age) {

        this.age = age;

    }

    public String getName() {

        return name;

    }

    public void setName(String name) {

        this.name = name;

    }

    public double getSalary(){

        return salary;

    }

    public void setSalary(double salary){

        this.salary = salary;

    }

    public void work(){

        System.out.println(name + "work");

    }

    public void equals(List<Worker> list){
        if(!list.equals(getAge())){
            System.out.println("ss");
        }else {
            System.out.println("ll");
        }
    }


}
